<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
<link rel="stylesheet" type="text/css" href="../Admin/role/css/index.css">
</head>
<script type="text/javascript" src="../Admin/role/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript"> 
function addClick(){ 	
	$(document).ready(function(){
	    var idsstr = "";
	    var zhi = "";
	    $(".mian_b_bg_xz input[name=checkbox]").each(function(){ //遍历table里的全部checkbox	    
	    	idsstr += $(this).val() + ","; //获取所有checkbox的值
	        if($(this).attr("checked")) //如果被选中
	        	zhi += $(this).val() + ","; //获取被选中的值
	    });
	    if(idsstr.length > 0) //如果获取到
	        idsstr = idsstr.substring(0, idsstr.length - 1); //把最后一个逗号去掉
	    if(zhi.length > 0) //如果获取到
	    zhi = zhi.substring(0, zhi.length - 1); //把最后一个逗号去掉
	    //alert("所有checkbox的值：" + idsstr);
	    //alert("被选中checkbox的值：" + zhi);
	    document.form.action="addRole.do?zhi="+zhi
	    document.form.submit()
	});
}

</script>
<body class="mian_bj">
<div class="mian_top_01">
<div class="mian_top_r"></div>
<div class="mian_top_l"></div>
<div class="mian_top_c">
</div>
<div class="mian_b">
<form action="" method="post" name="form">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mian_b_bg_xz">
<tr>
<td width="5%" class="mian_b_bg_lm">&nbsp;</td>
<td colspan="4" class="mian_b_bg_lm">添加角色</td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="7%" valign="top">角色名称：</td>
<td width="20%">
<span style="color: red">*</span> 
<input type="text" class="input_01" name="rolename" id="name">
</td>
<td width="7%"></td>
<td width="56%"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td valign="middle">权限管理：</td>
<td colspan="3">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mian_b_bg_xz">
<tr bgcolor="#BDB76B">
<td valign="top" colspan="3"><O>客户管理权限</O></td>
</tr>
<tr>
<td width="3%">&nbsp;</td>
<td colspan="2">
<input name="checkbox" type="checkbox" value="1">客户基础信息 &nbsp;&nbsp;&nbsp;
<input name="checkbox" type="checkbox" value="2">客户接待记录&nbsp;&nbsp;&nbsp;
<input name="checkbox" type="checkbox" value="3">销售机会
</td>
</tr>
<tr bgcolor="#BDB76B">
<td valign="top" colspan="3"><O>交易管理权限</O></td>
</tr>
<tr>
<td width="3%">&nbsp;</td>
<td colspan="2">
<input name="checkbox" type="checkbox" value="4">开盘管理&nbsp;&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="5">订单管理&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="8">合同管理&nbsp;&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="6">付款方式管理&nbsp;&nbsp;&nbsp;<input id="Checkbox77" type="checkbox" value="7">报告审核
</td>
</tr>
<tr>
<td valign="top" colspan="3" bgcolor="#BDB76B">
<O>后台管理权限</O></td>
</tr>
<tr>
<td width="3%">&nbsp;</td>
<td colspan="2">
<input name="checkbox" type="checkbox" value="9">用户管理&nbsp;&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="11">角色管理&nbsp;&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="11">组织机构管理&nbsp;&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="12">项目管理</br>
<input name="checkbox" type="checkbox" value="13">楼栋管理&nbsp;&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="14">单元管理&nbsp;&nbsp;&nbsp;<input name="checkbox" type="checkbox" value="15">房间管理
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="4">
<div align="center">
<input type="button" value="确定" onclick="addClick()" > 
</div>
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
